﻿@model MySite2.ViewModel.BooksViewModel
@{
    ViewBag.Title = "Index";
    Layout = "~/Areas/RedZone/Views/Shared/_LayoutRedzone.cshtml";
}
<h2>
    Books page</h2>
<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table style="text-align: left; border-collapse: collapse; margin: 0; padding: 0;">
    <tr>
        <th>
            Title
        </th>
        <th>
            CoverUrl
        </th>
        <th>
        </th>
    </tr>
    @foreach (var book in Model.PaginatedBookList)
    {
        <tr>
            <td style="width: 200px;">@book.Title
            </td>
            <td style="width: 100px;" class="col-center">
                <img alt="book image" src="@book.CoverUrl" width="70" />
            </td>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id = book.Id })
                <br />
                @Html.ActionLink("Details", "Details", new { id = book.Id })
                <br />
                @Html.ActionLink("Delete", "Delete", new { id = book.Id })
            </td>
        </tr>
    }
</table>

<br />

<hr />
@Html.DisplayFor(m => m.PaginatedBookList)
<hr />

